package com.bean;

import java.sql.Timestamp;
import java.util.Objects;

/**
 * @Author: 柏竹
 * @Description: 用户实体类
 * @Date_Created_in: 2021-05-26 17:36
 * @Modified_By: Sans
 * @Project: 快递e栈
 */
public class User {
    private int id;
    private String idnumber;
    private String username;
    private String userphone;
    private String password;
    private String loginip;
    private Timestamp loginime;
    private Timestamp createtime;
    private String ip;
    private boolean user;
    
    public User() {
    }
    
    public User(String idnumber , String username , String userphone , String password) {
        this.idnumber = idnumber;
        this.username = username;
        this.userphone = userphone;
        this.password = password;
    }
    
    public User(int id , String idnumber , String username , String userphone , String password , String loginip , Timestamp loginime , Timestamp createtime , String ip , boolean user) {
        this.id = id;
        this.idnumber = idnumber;
        this.username = username;
        this.userphone = userphone;
        this.password = password;
        this.loginip = loginip;
        this.loginime = loginime;
        this.createtime = createtime;
        this.ip = ip;
        this.user = user;
    }
    
    
    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", idNumber='" + idnumber + '\'' +
                ", username='" + username + '\'' +
                ", userphone='" + userphone + '\'' +
                ", password='" + password + '\'' +
                ", loginip='" + loginip + '\'' +
                ", loginime=" + loginime +
                ", createtime=" + createtime +
                ", ip='" + ip + '\'' +
                ", user=" + user +
                '}';
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user1 = (User) o;
        return id == user1.id && user == user1.user && Objects.equals(idnumber , user1.idnumber) && Objects.equals(username , user1.username) && Objects.equals(userphone , user1.userphone) && Objects.equals(password , user1.password) && Objects.equals(loginip , user1.loginip) && Objects.equals(loginime , user1.loginime) && Objects.equals(createtime , user1.createtime) && Objects.equals(ip , user1.ip);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(id , idnumber , username , userphone , password , loginip , loginime , createtime , ip , user);
    }
    
    public String getIdnumber() {
        return idnumber;
    }
    
    public void setIdnumber(String idnumber) {
        this.idnumber = idnumber;
    }
    
    public String getIp() {
        return ip;
    }
    
    public void setIp(String ip) {
        this.ip = ip;
    }
    
    public boolean isUser() {
        return user;
    }
    
    public void setUser(boolean user) {
        this.user = user;
    }
    
    public String getUserphone() {
        return userphone;
    }
    
    public void setUserphone(String userphone) {
        this.userphone = userphone;
    }
    
    public int getId() {
        return id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    public String getUsername() {
        return username;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }
    
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    public String getLoginip() {
        return loginip;
    }
    
    public void setLoginip(String loginip) {
        this.loginip = loginip;
    }
    
    public Timestamp getLoginime() {
        return loginime;
    }
    
    public void setLoginime(Timestamp loginime) {
        this.loginime = loginime;
    }
    
    public Timestamp getCreatetime() {
        return createtime;
    }
    
    public void setCreatetime(Timestamp createtime) {
        this.createtime = createtime;
    }
}
